package com.qixin.part.controller;


import com.qixin.api.bean.ComPtUser;
import com.qixin.api.bean.ComUserCarRenting;
import com.qixin.api.bean.pojo.WelcomScroll;
import com.qixin.api.service.ComUserCarRentingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 用户租车中间表 前端控制器
 * </p>
 *
 * @author 吕正睿
 * @since 2018-11-12
 */
@Controller
@RequestMapping("/comUserCarRenting")
public class ComUserCarRentingController {
    @Autowired
    ComUserCarRentingService comUserCarRentingService;

    @RequestMapping("/findWelcomScroll")
    @ResponseBody
    public List<WelcomScroll> findWelcomScroll(HttpSession session) {
        return comUserCarRentingService.findWelcomScroll(((ComPtUser) session.getAttribute("user")).getId());
    }

}
